package gui;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;

public class SimpleButton extends Rectangle {
	
	private String imageName = null;
	private Color color=Color.black;
	

	public SimpleButton(int x, int y, int width, int height){
		super(x, y, width, height);
	}
	
	public void setImage(String imageName){
		this.imageName=imageName;
	}
	public void setColor(Color c){
		color=c;
	}
	
	public void paint(Graphics g){
		if(imageName == null){
			g.setColor(color);
			g.fillRect(x, y, width, height);
		}
		else
			ImageHandler.getInstance().drawImage(x, y, width, height, imageName, g);
	}
	

}
